import Cookies from 'js-cookie'

const TokenKey = 'hrsass_admin_token'
const LoginTimeKey = 'hrsass login time'
//获取token
export function getToken() {
  return Cookies.get(TokenKey)
}
//设置token
export function setToken(token) {
  Cookies.set(LoginTimeKey, Date.now())
  return Cookies.set(TokenKey, token)
}
//清除token
export function removeToken() {
  return Cookies.remove(TokenKey)
}
//获取登录时间戳
export function getTimestamp() {
  return Cookies.get(LoginTimeKey)
}
